package com.bjsxt.livegoods.hotproduct.client.controller;





import com.bjsxt.livegoods.hotproduct.client.service.HotProductService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 热销商品服务消费者 --控制器
 */
@RestController
public class HotProductController {

    @Qualifier("com.bjsxt.livegoods.hotproduct.client.service.HotProductService")
    @Autowired
    private HotProductService hotProductService;
    @GetMapping
    @CrossOrigin
    public Map<String, Object> hotProducts(String city){
        return this.hotProductService.findHotProducts(city);
    }
}
